package com.yaoge.befor.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

//用@Aspect来表明这是一个切面类，让AspectJ能够找到这个切面类
@Aspect
public class SellAspect {
    @Before(value = "execution(* com.yaoge.befor.service.*.*(..) )")
    public  void sellAdvance(JoinPoint jp){
            Object[] objects= jp.getArgs();
            System.out.println("这次切入点是----------"+jp);
            System.out.println("getKind----------"+jp.getKind());
            System.out.println("getSignature----------"+jp.getSignature());
            System.out.println("getTarget----------"+jp.getTarget());
            System.out.println("getSourceLocation----------"+jp.getSourceLocation());
            System.out.println("getThis----------"+jp.getThis());
            System.out.println("getClass----------"+jp.getClass());
            for (Object object:objects){
               System.out.println("我是参数"+object);
            }

    }
}
